﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace NCS.DeviceManager.Models.Entities
{
    [Table("tbl_menu")]
    public class MenuEntity:BaseEntity
    {
        /// <summary>
        /// 父节点
        /// </summary>
        [Required, DefaultValue(0)] public int ParentId { get; set; } = 0;
        /// <summary>
        /// 排序
        /// </summary>
        [Required, DefaultValue(0)] public int Sequence { get; set; } = 0;
        /// <summary>
        /// 菜单名称
        /// </summary>
        [Required] public string MenuName { get; set; }
        /// <summary>
        /// 菜单路径
        /// </summary>
        [Required] public string Path { get; set; }
        /// <summary>
        /// 对应组件
        /// </summary>
        [Required] public string Component { get; set; }
        /// <summary>
        /// 所需图标
        /// </summary>
        public string IconCls { get; set; }
        /// <summary>
        /// 显示名字
        /// </summary>
        [Required] public string Title { get; set; }
        /// <summary>
        /// 所属类型
        /// </summary>
        public string Type { get; set; }
        public bool Affix { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool KeepAlive { get; set; }
        public bool RequiredAuth { get; set; }
    }
}
